﻿<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             x:Name="userControl"
             x:Class="Rio.Framework.Pages.ErrorPage"
             d:DesignWidth="640"
             mc:Ignorable="d"
             d:DesignHeight="480">

    <Grid x:Name="LayoutRoot">
        <Rectangle HorizontalAlignment="Stretch"
                   VerticalAlignment="Stretch"
                   Fill="#FF8A8A8A"
                   Opacity="0.8"
                   Margin="0">
            <Rectangle.Effect>
                <BlurEffect Radius="50" />
            </Rectangle.Effect>
        </Rectangle>
        <Border BorderBrush="White"
                BorderThickness="2"
                Margin="50"
                CornerRadius="15">
            <Border.Effect>
                <DropShadowEffect Direction="680"
                                  Opacity="0.655"
                                  BlurRadius="9"
                                  ShadowDepth="7" />
            </Border.Effect>
            <Border.Background>
                <LinearGradientBrush EndPoint="0.5,1"
                                     StartPoint="0.5,0">
                    <GradientStop Color="#FF546276"
                                  Offset="0" />
                    <GradientStop Color="#FF3D4654"
                                  Offset="1" />
                </LinearGradientBrush>
            </Border.Background>
            <StackPanel Margin="10,10">
                <TextBlock FontSize="18.667"
                           FontWeight="Bold"
                           Foreground="White"
                           Text="{Binding ErrorTitle, ElementName=userControl}" TextWrapping="Wrap" />
                <TextBlock TextWrapping="Wrap"
                           Text="{Binding FriendlyMessage, ElementName=userControl}"
                           FontStyle="Italic"
                           Foreground="White"
                           FontSize="14.667"
                           Margin="0,10,0,0" />
                <telerik:RadExpander Margin="0,20,0,0"
                                     Header="Afficher les détails"
                                     FontStyle="Italic"
                                     Foreground="White"
                                     IsExpanded="False">
                    <ScrollViewer Margin="10,5,0,0"
                                  HorizontalScrollBarVisibility="Auto"
                                  VerticalScrollBarVisibility="Auto">
                        <StackPanel>
                            <sdk:Label Content="{Binding ErrorCode, ElementName=userControl, StringFormat=Code : \{0\}}" />
                            <TextBlock TextWrapping="Wrap"
                                       Text="{Binding ErrorMessageDetail, ElementName=userControl}"
                                       Margin="0,10,0,0" />
                            <TextBlock TextWrapping="Wrap"
                                       Text="{Binding StackTrace, ElementName=userControl}"
                                       Margin="0,10,0,0" />
                        </StackPanel>
                    </ScrollViewer>
                </telerik:RadExpander>
                <Button Content="Fermer"
                        Margin="0,10,10,5"
                        HorizontalAlignment="Right"
                        Height="22" Width="93" Click="Button_Click" />
            </StackPanel>
        </Border>
    </Grid>
</UserControl>